package com.huiztech.maystall.activity;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;

public class PayInfoActivity extends BaseActivity{

    private static final String[] fangshi={"在线付款","银行汇款"};   
    private static final String[] peisong1={"邮递","自取"};   
    private static final String[] peisong2={"15","20"};   
    private static final String[] map={"Alaska","Neryork"};   
    
    private ArrayAdapter<String> fangshiAdapter;
    private ArrayAdapter<String> peisongAdapter1;
    private ArrayAdapter<String> peisongAdapter2;
    private ArrayAdapter<String> mapAdapter;
    
    private Button backBtn;
    private Spinner fangshiSpinner,peisongSpinner1,peisongSpinner2,mapSpinner;
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_pay_info);
        backBtn = (Button) findViewById(R.id.pay_info_back_btn);
        fangshiSpinner = (Spinner) findViewById(R.id.pay_info_fangshi_spinner);
        peisongSpinner1 = (Spinner) findViewById(R.id.pay_info_peisong1_spinner);
        peisongSpinner2 = (Spinner) findViewById(R.id.pay_info_peisong2_spinner);
        mapSpinner = (Spinner) findViewById(R.id.pay_info_map_spinner);
        
        fangshiAdapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,fangshi);   
        fangshiAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);   
        fangshiSpinner.setAdapter(fangshiAdapter);
        
        peisongAdapter1 = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,peisong1);   
        peisongAdapter1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);   
        peisongSpinner1.setAdapter(peisongAdapter1);  
        
        peisongAdapter2 = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,peisong2);   
        peisongAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);   
        peisongSpinner2.setAdapter(peisongAdapter2);  
        
        mapAdapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,map);   
        mapAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);   
        mapSpinner.setAdapter(mapAdapter);   
        
        backBtn.setOnClickListener(new OnClickListener() {
            
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        
        
    }
}
